package com.xxyf.tools;

import lombok.Getter;
import lombok.Setter;

/**
 * @Author 小小怡飞
 * @Date 2022/9/5 9:41
 * @Version JDK 8
 */
@Getter
@Setter
public class Page {
    private Integer start;
    private Integer end;
    private Integer total;
    private Integer size;
    private Integer number;
    private boolean succeed;
    public Page(Integer total,Integer size,Integer number){
        succeed=true;
        this.total=total;
        this.size=size;
        this.number=number;
        if (total-number*size>-size){
            end=number*size;
            start=(number-1)*size;
        }else {
            succeed=false;
        }
    }
    public Page(){

    }

}
